Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep compability with stdlib tokenize.py changes #801

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

mwhudson
Copy link
Contributor

python/cpython@c4ef489
is not yet part of any release of Python but has been backported to all
versions in Git (includeing 2.7!). It causes the tokenize.py module to
emit a synthetic NEWLINE token for files that do not in fact end with a
newline, which confuses pycodestyle's checks for blank lines at the end
of a file. Fortunately the synthetic NEWLINE tokens are easy to detect
(the token text is "").

Fixes #786

python/cpython@c4ef489
is not yet part of any release of Python but has been backported to all
versions in Git (includeing 2.7!). It causes the tokenize.py module to
emit a synthetic NEWLINE token for files that do not in fact end with a
newline, which confuses pycodestyle's checks for blank lines at the end
of a file. Fortunately the synthetic NEWLINE tokens are easy to detect
(the token text is "").

Fixes PyCQA#786
@sigmavirus24 sigmavirus24 merged commit 3d37ea0 into PyCQA:master Nov 22, 2018
@sigmavirus24
Copy link
Member

Thanks @mwhudson! This is great and I think this fixes the issues we have had with our 3.7 tests. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants